package birdsnail.springcloud.myselfserviceprovider.dao;

import birdsnail.springcloud.myselfserviceprovider.domain.Person;
import birdsnail.springcloud.myselfserviceprovider.mapper.PersonMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class PersonDao {

    private final PersonMapper personMapper;

    @Autowired
    public PersonDao(PersonMapper personMapper) {
        this.personMapper = personMapper;
    }

    public Person getPersonById(Integer id) {
        return personMapper.selectById(id);
    }
}
